<%-- 
    Document   : nuevoDirectivo
    Created on : 24/09/2009, 05:32:36 PM
    Author     : ADMINISTRADOR
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@taglib prefix="r" uri="http://richfaces.ajax4jsf.org/rich" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<script language="javascript" src="../js/funciones.js"></script>
<link href="/colegiatura/Estilos/estilosEsymons.css" rel="stylesheet" type="text/css" />

<f:view>
<h:form>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td height="25" class="texto3" align="left">
        <h:outputLabel value="Junta Directiva" />  </td>
      </tr>
      <tr><td height="20">
     <a4j:outputPanel ajaxRendered="true">
    <h:messages id="lblMessages" styleClass="messages" infoClass="infoClass" errorClass="errorClass"
                warnClass="warnClass" showDetail="true" errorStyle="color:red;"
                warnStyle="color:green;" infoStyle="color:black;" fatalStyle="color:black"/>
    </a4j:outputPanel>
      </td>
  </tr>
<tr>
<td>
<fieldset><legend>Seleccionar Tipo</legend>
  <table width="700" border="0">
  <tr>
        <td width="100" height="25">&nbsp;</td>
        <td colspan="2" align="left">
       <h:outputLabel value="Tipo Directivo:" styleClass="texto22" />&nbsp;
       <h:selectOneMenu value="#{directivosController.otroDirectivo}" onchange="submit();" styleClass="fondo012" >
            <f:selectItem itemLabel="-----Seleccionar-----" itemValue="0"/>
            <f:selectItem itemLabel="Directivo Consejo Nacional" itemValue="1"/>
            <f:selectItem itemLabel="Directivo CDLL" itemValue="2" />
        </h:selectOneMenu>
        <h:commandButton action="#{directivosController.listado}" value="Retornar" styleClass="enlace9" /></td>
        <td width="112">&nbsp;</td>
      </tr>
  </table>
</fieldset>
</td>
</tr>
<%--  registrar un directivo del consejo nacional --%>
      <h:panelGroup rendered="#{directivosController.otroDirectivo==1}">
<tr><td>
<fieldset><legend>Buscar CIP</legend>
  <table width="700" border="0">
  <tr>
    <td width="100" height="25">&nbsp;</td>
   <td width="150"><h:outputLabel value="Registro Cip: " styleClass="texto22" /></td>
   <td width="151"><h:inputText value="#{directivosController.nroCIP}" styleClass="fondo012" /></td>
   <td width="107"><h:commandButton action="#{directivosController.buscarColegiadoWS}" value="Buscar" styleClass="enlace9" /></td>
    <td width="129">&nbsp;</td>
    <td width="37">&nbsp;</td>
        </tr>
  </table>
</fieldset>
</td></tr>
<tr><td>
<fieldset><legend>Datos Colegiado</legend>
  <table width="700" border="0">
  <tr><td width="100" height="25">&nbsp;</td>
           <td width="156"><h:outputLabel value="Nombres: " styleClass="texto22" /></td>
            <td colspan="4"><h:inputText value="#{directivosController.personaNatural.perNombres}" styleClass="fondo012" size="30"/></td>
        </tr>
         <tr><td width="100" height="25">&nbsp;</td>
           <td width="156"><h:outputLabel value="Apellido Paterno: " styleClass="texto22" /></td>
            <td colspan="4"><h:inputText value="#{directivosController.personaNatural.perapellidoPaterno}" styleClass="fondo012" size="30"/></td>
        </tr>
         <tr><td width="100" height="25">&nbsp;</td>
           <td width="156"><h:outputLabel value="Apellido Materno: " styleClass="texto22" /></td>
            <td colspan="4"><h:inputText value="#{directivosController.personaNatural.perapellidoMaterno}" styleClass="fondo012" size="30"/></td>
        </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td><h:outputLabel value="Área:" styleClass="texto22" /></td>
            <td colspan="4">
            <h:selectOneMenu value="#{cargoController.codarea}" styleClass="fondo012" onchange="submit();">
                <f:selectItem itemLabel="------Seleccionar------" />
                <f:selectItems value="#{areaController.selectListaArea}" />
            </h:selectOneMenu></td>
          </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td><h:outputLabel value="Cargo:" styleClass="texto22" /></td>
            <td colspan="4">
                <h:selectOneMenu value="#{directivosController.directivos.carCodigo}" styleClass="fondo012">
                <f:selectItem itemLabel="------Seleccionar------" />
                <f:selectItems value="#{cargoController.selectListaCargosArea}" />
            </h:selectOneMenu></td>
          </tr>
          <tr><td height="25">&nbsp;</td>
            <td><h:outputLabel  value="Fecha Inicio:" styleClass="texto22" /></td>
            <td width="172">
                <r:calendar value="#{directivosController.directivos.dirfechaInicio}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" /></td>
            <td width="83">&nbsp;</td>
            <td width="57">&nbsp;</td>
            <td width="106">&nbsp;</td>
          </tr>
          <tr><td height="25">&nbsp;</td>
            <td><h:outputLabel value="Fecha Fin:" styleClass="texto22" /></td>
            <td><r:calendar value="#{directivosController.directivos.dirfechaFin}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td height="25" colspan="6">&nbsp;</td>
          </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="3" align="center"><h:commandButton  action="#{directivosController.guardaSecretarioCN}" value="Guardar" styleClass="enlace9" />              <h:commandButton action="#{directivosController.listado}" value="Cancelar" styleClass="enlace9" /></td>
            <td>&nbsp;</td>
          </tr>
  </table>
</fieldset>
</td></tr>
</h:panelGroup>
  <%-- registrar un directivo del CIP - CDLL --%>
  <h:panelGroup rendered="#{directivosController.otroDirectivo==2}">
<tr><td>
<fieldset><legend>Buscar CIP</legend>
  <table width="700" border="0">
  <tr>
    <td width="100" height="25">&nbsp;</td>
   <td width="150"><h:outputLabel value="Registro Cip: " styleClass="texto22" /></td>
   <td width="151"><h:inputText value="#{directivosController.codigoCIP}" styleClass="fondo012" /></td>
   <td width="107"><h:commandButton action="#{directivosController.buscaCIP}" value="Buscar" styleClass="enlace9" /></td>
    <td width="129">&nbsp;</td>
    <td width="37">&nbsp;</td>
        </tr>
  </table>
</fieldset>
</td>
</tr>
<h:panelGroup rendered="#{directivosController.bandera==true}">
<tr><td>
<fieldset><legend>Datos Colegiado</legend>
  <table width="700" border="0">
  <tr>
            <td width="100" height="25">&nbsp;</td>
            <td width="150"><h:outputLabel value="Nombre:" styleClass="texto22" /></td>
            <td colspan="2"><h:outputLabel value="#{directivosController.colegiado.personaNatural.nombreCompleto}"  styleClass="texto20"  /></td>
            </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td><h:outputLabel value="Área:" styleClass="texto22" /></td>
            <td colspan="2">
                <h:selectOneMenu value="#{cargoController.codarea}" styleClass="fondo012" onchange="submit();">
                <f:selectItem itemLabel="------Seleccionar------" />
                <f:selectItems value="#{areaController.selectListaArea}" />                
            </h:selectOneMenu></td>
            </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td><h:outputLabel value="Cargo:" styleClass="texto22" /></td>
            <td colspan="2">
                <h:selectOneMenu value="#{directivosController.directivos.carCodigo}" styleClass="fondo012">
                <f:selectItem itemLabel="------Seleccionar------" />
                <f:selectItems value="#{cargoController.selectListaCargosArea}" />
            </h:selectOneMenu></td>
            </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td><h:outputLabel  value="Fecha Inicio:" styleClass="texto22" /></td>
            <td colspan="2">
                <r:calendar value="#{directivosController.directivos.dirfechaInicio}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" /></td>
            </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td><h:outputLabel value="Fecha Fin:" styleClass="texto22" /></td>
            <td colspan="2">
                <r:calendar value="#{directivosController.directivos.dirfechaFin}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" /></td>
            </tr>
          <tr>
            <td height="25" colspan="4">&nbsp;</td>
          </tr>
          <tr>
            <td height="25">&nbsp;</td>
            <td>&nbsp;</td>
            <td width="215" align="center"><h:commandButton  action="#{directivosController.grabar}" value="Guardar" styleClass="enlace9" />
                <h:commandButton action="#{directivosController.listado}" value="Cancelar" styleClass="enlace9" /></td>
            <td width="217">&nbsp;</td>
          </tr>
  </table>
</fieldset>
</td>
</tr>
  </h:panelGroup>
      </h:panelGroup>
    </table>       
</h:form>
</f:view>
